package logic;

import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author Geoffrey Shaw & Kris Deviat
 * Notice: This code is based off of Kris's assignment5 "Customer" object from last semester
 *
 */
public class PayrollRecord
{
	static final long serialVersionUID = 1L;
	
	public static int SIZE = 49;
	
	public static final int offset_payroll_date = 0;
	public static final int offset_emp_id = 27;
	public static final int offset_amount = 38;
	public static final int offset_Status = 46;
	
	private String payroll_date;
	private String emp_Id;
	private double amount;
	private String status;

	public PayrollRecord()
	{
	}
	
	public PayrollRecord(String payroll_date, String emp_Id, double amount, String status)
	{
		this.payroll_date = payroll_date;
		this.emp_Id = emp_Id;
		this.amount = amount;
		this.status = status;
	}
	public String getPayroll_date() {
		return payroll_date;
	}

	public void setPayroll_date(String payroll_date) {
		this.payroll_date = payroll_date;
	}

	public String getEmp_Id() {
		return emp_Id;
	}

	public void setEmp_Id(String emp_Id) {
		this.emp_Id = emp_Id;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	public String payrollCSV(char delimiter)
	{
		return payroll_date+delimiter+emp_Id+delimiter+amount+delimiter+status;
	}
	
	@Override
	public String toString() {
		return "PayrollRecord [payroll_date=" + payroll_date + ", emp_Id="
				+ emp_Id + ", amount=" + amount + ", status=" + status + "]";
	}
}
